<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>高级检索</title>
    <script src="/jquery/jquery-3.2.1.min.js"></script>
    <script src="/layui/layui.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css"/>
    <link rel="stylesheet" href="/css/toexamine/productlist-layer/productlist-precisesearch.css"/>
</head>
<body>
<div class="bodr">
    <form class="layui-form" id="myFrom">
        <div class="layui-form-item">
            <p>
            <div class="layui-input-inline mar">
                用户账号： <input type="text" name="account" required lay-verify="required" placeholder="用户账号" autocomplete="off" class="layui-input inp">
            </div>
            <div class="layui-input-inline mar">
                用户状态：
                <div class="layui-input-inline fontsize inp">
                    <select name="status" id="proTitle" lay-verify="required" lay-filter="proTitle" >
                        <option value="2">正常</option>
                        <option value="5">停用</option>
                    </select>
                </div>
            </div>
            </p>

            <p>
            <div class="layui-input-inline mar">
                用户昵称：<input type="text" name="nickname" required lay-verify="required" placeholder="用户昵称" autocomplete="off" class="layui-input inp">
            </div>
            <div class="layui-input-inline mar">
                注册时间：<input type="text" id="test1" name="createDate" required lay-verify="required" placeholder="注册时间" autocomplete="off" class="layui-input inp">
            </div>
            </p>
            <p>
            <div class="layui-input-inline mar">
                身份证号码：<input type="text" name="idCard" required lay-verify="required" placeholder="身份证" autocomplete="off" class="layui-input inp">
            </div>
            <div class="layui-input-inline mar">
                手机号码：<input type="text" name="phone" required lay-verify="required" placeholder="注册时间" autocomplete="off" class="layui-input inp">
            </div>
            </p>
        </div>
        <div style="margin-left:100px ">
            <button onclick="refresh()" type="button" class="layui-btn">重置</button>
            <button onclick="search()" type="button" class="layui-btn">搜索</button>
        </div>
    </form>
</div>
</body>
    <script>
        var form;
        var $;
        var laydate;
        var url;
        layui.use(['laydate','form','jquery'],function() {
            form = layui.form;
            $ = layui.jquery;
            laydate = layui.laydate;

            laydate.render({
                elem: '#test1', //指定元素
                type:'datetime',
            });
        });
        //重置
        function refresh() {
            $('#myFrom')[0].reset();
        }

        //搜索
        function search() {
            var account = $('input[name = account]').val();
            var status =  $('select[name=status]').val();
            var nickname = $('input[name=nickname]').val();
            var createDate = $('input[name = createDate]').val();
            var idCard = $('input[name = idCard]').val();
            var phone = $('input[name = phone]').val();
            $.ajax({
                url:parent.route(),
                dataType:'json',
                data:{
                    "account":account,"status":status,"nickname":nickname,"createDate":createDate
                    ,"idCard":idCard,"phone":phone,"consumption":parent.zero()
                },
                success:function (data) {
                    parent.startTab(data.data);
                    var layer = parent.layer;
                    layer.close(layer.index);
                }
            });
        }
    </script>
</html>